<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title></title>

    <link href="/styles/base.css" rel="stylesheet" type="text/css">
    <link href="/styles/addtravelnote.css" rel="stylesheet" type="text/css">
    <link href="/js/ueditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
    <link href="/js/plugins/datepicker/datepicker.css" rel="stylesheet">
    <script type="text/javascript" src="/js/jquery/jquery.js"></script>

    <script src="/js/plugins/datepicker/datepicker.js"></script>
    <script src="/js/plugins/jquery-form/jquery.form.js"></script>

    <link href="/js/plugins/chosen/chosen.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/plugins/chosen/chosen.jquery.js"></script>
    <script type="text/javascript" src="/js/system/common.js"></script>
    <script type="text/javascript" charset="utf-8" src="/js/ueditor/umeditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/js/ueditor/umeditor.min.js"></script>
    <script type="text/javascript" src="/js/ueditor/lang/zh-cn/zh-cn.js"></script>
    <script type="text/javascript" src="/js/system/addqaacomment.js"></script>

    <link href="http://css.mafengwo.net/css/cv/css+mfw-ask+detail_v3:css+mfw-ask+img_pop:css+mfw-ask+detail_answer_foldup:css+mfw-ask+upload_pics:css+mfw-ask+pop_answer_success^Ylda^1557212042.css"
          rel="stylesheet" type="text/css"/>

    <style type="text/css">
        .q-desc img {
            width: 100%;
        }
    </style>

    <script>
        $(function () {
            //点击回答，页面聚焦到回答框
            $("#btn_answer").click(function () {
                $("#editor").focus();
            })

            //发布回答
            $("#commentBtn").click(function () {
                $("#editForm").ajaxSubmit(function (data) {
                    if (data.success) {
                        // window.location.href = "/qaa/detail?id=" + data.data
                        window.location.reload();
                    } else {
                        popup("操作失败,请检查是否登陆");
                    }
                })
            })


            //隐藏form
            $(".secondEditForm").hide();
            $(".cmt-toggle").click(function () {
                var num = $(".cmt-toggle").index(this);
                // $(".secondEditForm").toggle('slow');
                $(".secondEditForm").eq(num).show('slow');
                /*$(".secondCommentBtn").click(function () {
                    window.location.reload();
                })*/
            })
        })

        //二级评论
        function submitForm(t) {
            $(t).parent().parent().ajaxSubmit(function (data) {
                if (data.success) {
                    // window.location.href = "/qaa/detail?id=" + data.data
                    window.location.reload();
                } else {
                    popup("操作失败,请检查是否登陆");
                }
            })
        }



    </script>

</head>
<body>

<div class="topBar">
    <#assign currentNav="community">
    <#include "../common/navbar.ftl">
</div>


<div class="wrapper" data-qid="10987766" data-uid="35744251" id="_js_wrapper" data-is_answer_detail="0" data-source="1">
    <div class="detail-wrap clearfix">
        <!-- 问答主要内容 -->
        <div class="col-main">
            <!-- 面包屑导航 -->
            <div class="crumb">
                <a href="/qanda/" target="_blank">骡窝窝问答</a> &gt; <span>${detail.title!}</span>
            </div>
            <!-- 搜索区域 -->
            <div class="search-box">

                <div class="search-box">
                    <div class="search-panel" data-cs-t="wenda">
                        <div class="clearfix _j_suggest_hd">
                            <form action="/qanda" method="post" id="keywordForm">
                                <div class="sp-input">
                                    <input type="text" name="keyword" id="_j_wenda_seach_input" value="${qo.keyword!}"
                                           placeholder="提问前请先搜索，看看你的问题其他人是否已经问过">
                                </div>
                                <input type="submit" value="" id="_j_wenda_seach_button" class="sp-button"
                                       data-mddid="0">
                            </form>
                        </div>
                        <div class="bd _j_suggest_box hide">
                        </div>
                    </div>
                </div>
            </div>
            <!-- 问题区域 -->
            <div class="q-detail" id="_js_askDetail">
                <!-- 问题详情 -->
                <div class="q-content">
                    <div class="q-title">
                        <a href="javascript:;" target="_blank" class="location"><i></i>${detail.dest.name!}</a>
                        <h1>
                            ${detail.title!}
                        </h1>
                    </div>
                    <div class="q-desc">
                        ${detail.questionAndAnswerContent.content!}
                    </div>
                    <div class="q-info1 clearfix">
                        <div class="pub-bar fr">
                            <a href="javascript:;" class="photo" target="_blank"> <img
                                        src="${detail.author.headImgUrl}"
                                        width="16" height="16"></a>
                            <a class="name" href="javascript:;" target="_blank">${detail.author.nickname!}</a>
                            <span class="time"><span>${detail.questionTime?datetime}</span></span>
                        </div>
                    </div>
                </div>

                <div class="q-operate clearfix">
                    <div class="fl">
                        <!-- 问题分享 -->
                        <div class="q-share cate-share">
                            <a class="_js_showShare"><i class="q-share-icon"></i>分享</a>
                        </div>
                        <!-- 邀请回答 -->
                        <div class="seek-help _j_tip_box">
                            <a class="_j_seek_help_new">邀请蜂蜂回答</a>
                        </div>
                        <!-- 举报 -->
                        <div class="admin_hide tip-off">
                            <a data-japp="report" data-refer="http://www.mafengwo.cn/wenda/detail-10987766.html"
                               data-refer-uid="35744251" data-app="qa.question" data-busi-id="qid:10987766">举报</a>
                        </div>
                    </div>
                    <div class="fr">
                        <span class="atten-num">${detail.viewnum!}浏览</span>
                        <span class="atten-num"><span class="_j_same_num">101</span>人关注</span>

                        <a class="btn-atten _j_same_question " rel="nofollow" data-status=1><span>关注</span></a>

                        <a class="btn-answer _j_btn_goanswer" id="btn_answer" rel="nofollow">回答</a>
                    </div>
                </div>

                <!-- 修改问题内容 -->

            </div>
            <!-- 回答区域 -->
            <div class="answer-wrap">
                <div class="hd">
                    <span id="_j_anum">${detail.replynum!}</span>个回答
                </div>

                <div class="bd _j_pager_box">
                    <ul class="answer-list ">
                        <!-- 回答列表 -->
                        <#list firstLevelList as fll>
                            <div data-pagelet id="normal_answer_wrap" class=""
                                 data-controller="/js/qa/ControllerDetailAnswerList">
                                <#if !fll.replyId??>
                                    <li class="answer-item clearfix _j_answer_item _js_answer10989404 "
                                        data-aid="10989404">
                                        <#--<div class="answer-side _js_answerAva">
                                            <a class="btn-ding _js_zan "><i></i>
                                                <span data-real_num="357">${fll.thumbsupnum!0}</span></a>
                                        </div>-->
                                        <div class="answer-content _js_answer_content">
                                            <div class="answer-info clearfix">
                                                <div class="user-bar fl">
                                                    <a class="_j_filter_click avatar" href="javascript:;"
                                                       target="_blank">
                                                        <img src="${(fll.fromUser.headImgUrl)?default(" http://n1-q.mafengwo.net/s12/M00/35/98/wKgED1uqIreAU9QZAAAXHQMBZ74008.png?imageMogr2%2Fthumbnail%2F%2148x48r%2Fgravity%2FCenter%2Fcrop%2F%2148x48%2Fquality%2F100 ")}"
                                                             width="48" height="48" class="photo"></a>
                                                    <a class="name" href="javascript:;"
                                                       target="_blank">${fll.fromUser.nickname}</a>
                                                    <a class="level" href="javascript:;" target="_blank"
                                                       rel="nofollow">LV.${fll.fromUser.level!}</a>
                                                </div>
                                            </div>
                                            <!-- 回答内容 -->
                                            <div class="_j_long_answer_item">
                                                <div class="_j_answer_html">
                                                    ${(fll.content)!}
                                                </div>
                                            </div>
                                        </div>
                                        <!-- 问答版权名片 -->
                                        <div class="a-operate _js_operate clearfix">
                                            <div class="fl">
                                                <!-- 问题分享 -->
                                                <div class="q-share cate-share">
                                                    <a class="_js_showShare"><i class="q-share-icon"></i>分享</a>
                                                    <div class="share-pop _j_share_pop hide clearfix"
                                                         data-title="你第一次买奢侈品是怎样的体验？入手的是什么？现在看来值得买吗？"
                                                         data-qid="10987766"
                                                         data-aid="10989404">
                                                        <a title="分享到新浪微博" class="sina _j_do_share" data-site="wb"
                                                           data-username="Celine"></a>
                                                        <a title="分享到QQ空间" class="zone _j_do_share" data-site="qz"
                                                           data-username="Celine"></a>
                                                        <a title="分享到微信" class="weixin _j_do_share_wx" data-site="wx"
                                                           data-username="Celine"></a>
                                                    </div>
                                                </div>
                                                <div class="cmt-toggle">
                                                    <a class="_js_slideComment"><i></i><span>评论</span></a>
                                                </div>
                                                <div class="collect">
                                                    <a class="_j_collect_answer"><i></i>收藏</a>
                                                </div>
                                                <div class="pub-time">
                                                    <span>发布于 ${fll.replyTime?datetime}</span>
                                                </div>
                                                <div class="tip-off">
                                                    <a data-japp="report"
                                                       data-refer="http://www.mafengwo.cn/wenda/detail-10987766.html#answer10989404"
                                                       data-refer-uid="91567854" data-app="qa.answer"
                                                       data-busi-id="aid:10989404">举报</a>
                                                </div>
                                            </div>
                                        </div>


                                        <#--二级回复-->

                                        <div class="comment-wrap _js_comments is_foldup_detail">
                                            <b class="arrow"><i></i></b>


                                            <div class="_js_comment_list">
                                                <#list firstLevelList as sll>
                                                    <#if sll.replyId?? && sll.replyId==fll.id >
                                                        <ul class="comment-list _j_comment_list_ul">
                                                            <li class="comment-item clearfix" data-cid="11029203"
                                                                data-username="">
                                                                <div class="comment-user">
                                                                    <a href="/u/75238294.html" target="_blank"><img
                                                                                src="${(sll.fromUser.headImgUrl)?default(" http://n1-q.mafengwo.net/s12/M00/35/98/wKgED1uqIreAU9QZAAAXHQMBZ74008.png?imageMogr2%2Fthumbnail%2F%2148x48r%2Fgravity%2FCenter%2Fcrop%2F%2148x48%2Fquality%2F100 ")}"
                                                                                class="photo"></a>
                                                                </div>
                                                                <dl>
                                                                    <dt>
                                                                        <a href="/u/75238294.html" target="_blank"
                                                                           class="c-name">${(sll.fromUser.nickname)!}</a>
                                                                        <a href="/rank/lv.php?uid=75238294"
                                                                           class="level"
                                                                           target="_blank">LV.${(sll.fromUser.level)}</a>
                                                                        : ${(sll.content)!}
                                                                    </dt>
                                                                    <dd>
                                                                        <div class="c-info">
                                                                            <span class="c-time fl">${(sll.replyTime?datetime)!}</span>
                                                                            <br>
                                                                            <#--分割线-->
                                                                            <HR style="FILTER: alpha(opacity=100,finishopacity=0,style=1)"
                                                                                width="100%" color=#EAEAEA SIZE=1>
                                                                        </div>
                                                                    </dd>
                                                                </dl>
                                                            </li>
                                                        </ul>
                                                    </#if>
                                                </#list>
                                            </div>

                                            <div class="cycleForm">
                                                <form class="forms secondEditForm" action="/qanda/commentAdd"
                                                      id="secondEditForm"
                                                      method="post">
                                                    <input type="hidden" name="questionAndAnswer.id"
                                                           value="${(detail.id)!}">
                                                    <input type="hidden" name="toId" value="${(fll.fromUser.id)!0}">
                                                    <input type="hidden" name="replyId" value="${(fll.id)!0}">
                                                    <div class="comment-add clearfix _j_word">

                                                    <textarea class="_j_content _j_word_check"
                                                              name="content"></textarea>
                                                        <input class="btn-comment _j_publish_comment secondCommentBtn"
                                                               id="secondCommentBtn"  onclick="submitForm(this)" type="button" value="回复">
                                                    </div>
                                                </form>
                                            </div>


                                        </div>


                                    </li>
                                </#if>
                            </div>


                        </#list>
                    </ul>
                </div>


                <div class="answer-add clearfix">
                    <a name="answer"></a>
                    <div class="aa-hd">
                        <a class="aa-avatar" href="javascript:;"><img
                                    src="http://b2-q.mafengwo.net/s12/M00/35/B7/wKgED1uqIs-AMYTwAAAX-VIKIo0071.png?imageMogr2%2Fthumbnail%2F%2148x48r%2Fgravity%2FCenter%2Fcrop%2F%2148x48%2Fquality%2F90"
                                    class="photo"></a>
                        <a class="aa-name"><#--${userInfo.nickName!}--></a>

                    </div>
                </div>


                <form class="forms" action="/qanda/commentAdd" method="post" id="editForm">
                    <#--                    <input type="hidden" name="currentPage" id="currentPage" value="1">-->
                    <input type="hidden" name="questionAndAnswer.id" value="${(detail.id)!}">
                    <dl class="body cf">
                        <dd id="content_div">
                            <script id="editor" type="text/plain" style="width:100%;height:500px;"></script>
                        </dd>
                    </dl>
                    <div class="btns">
                        <div class="accept_pact">
                            <input type="checkbox" checked="">
                            我已阅读并同意<a href="javascript:;" title="《骡窝窝游记协议》" target="_blank">《骡窝窝游记协议》</a>
                        </div>
                        <input class="btn_submit" id="commentBtn" value="回答" type="button">

                    </div>
                </form>

            </div>
        </div>
        </form>

        <!-- 问答页面侧边栏 -->
        <div class="col-side" id="_js_right_side">
            <!-- 我要提问 -->
            <div class="btn-question">
                <a href="/qanda/input/" class="btn-ask btn-ask2" target="_blank">我要提问</a>
            </div>
            <!-- 相关问题 -->
        </div>
    </div>
</div>


<#include "../common/footer.ftl">

</body>
</html>
